#ifndef PODZIAL_H
#define	PODZIAL_H


#include <iostream>
#include "Global.h"

class Podzial 
{
    
#ifndef GPU_INCLUDED
    double getx_(double eta, double ksi, int nn, double *
            xn, double *yn, double *rn, double *xrn, double *yrn,
            double xcharld, double ycharld, double xcharl,
            double ycharl, int ncharld, int ncharl, double
            xchard, double ychard, double xchar, double ychar,
            int nchard, int nchar);

    double getx_p(double y, double ksi, double t1p,
            double t2p, double t1l, double t2l, double *tn,
            double *xn, double *yn, double *rn, double *xrn,
            double *yrn, double *alpn, double *alkn);

    double getxbep_(double eta, double xp, double yp,
            double xk, double yk, double *xn, double *yn,
            double *rn, double *xrn, double *yrn);

    double gety(double x, double eta, double t1g, double
            t2g, double t1d, double t2d, double *tn, double *xn,
            double *yn, double *rn, double *xrn, double *yrn,
            double *alpn, double *alkn);

    double gettx(double t1, double t2, double x, double *
            tn, double *xn, double *rn, double *xrn, double *alpn,
            double *alkn);

    double getty(double t1, double t2, double y, double *
            tn, double *yn, double *rn, double *yrn, double *alpn,
            double *alkn);
    
#endif    

    double getxbrz(double tbiez, double *tn, double *xn,
            double *rn, double *xrn, double *alpn, double *alkn);

    double getybrz(double tbiez, double *tn, double *yn,
            double *rn, double *yrn, double *alpn, double *alkn);

    double getxbep(double eta, double xp, double yp,
            double xk, double yk, double *xn, double *yn,
            int n);

    double xbrz(double t, double t1, double x1, double t2,
            double x2, double r, double xr, double alp, double alk);

    double ybrz0(double t, double t1, double y1, double t2,
            double y2, double r, double yr, double alp, double alk);

    double gett(double *xp, double *yp, int n, double *x,
            double *y, double *r, double *xr, double *yr,
            double *t);

    int normtot(int n, double *podz, double tp, double tk);

    double ypasma(double xp, int n, double *x, double *y,
            double *r__, double *xr, double *yr, int imode);

public:
    int podzial(int mw, int nw, double *xpodz,
            double *ypodz, int *nn, double *xn, double *yn,
            double *rn, double *xrn, double *yrn, double *tn,
            double *alpn, double *alkn, double *xnew, double *
            xcharl, double *ycharl, double *xchar, double *ychar,
            double *xchard, double *ychard, double *xcharld,
            double *ycharld, const std::string& typ);

};



#endif	/* PODZIAL_H */

